home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9158 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: zk2nws.zko.dec.com!usenet
  2. From: Webb Scales <scales@zko.dec.com>
  3. Newsgroups: comp.programming.threads,comp.lang.c++,comp.unix.osf.osf1,comp.unix.programmer,comp.object
  4. Subject: Re: Looking for best design for using pthreads in C++ objects
  5. Date: Wed, 28 Feb 1996 19:36:05 -0500
  6. Organization: Digital Equipment Corporation, DECthreads
  7. Message-ID: <3134F4F5.167E@zko.dec.com>
  8. References: <3128ff8b.666031216@news.clark.net> <312A0E5F.7B2C@ix.netcom.com>
  9.         <31320705.41C6@zko.dec.com> <puag248wxl.fsf@themroc.colibri.de>
  10. NNTP-Posting-Host: chook.zko.dec.com
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=us-ascii
  13. Content-Transfer-Encoding: 7bit
  14. X-Mailer: Mozilla 2.0 (X11; I; OSF1 V3.2 alpha)
  15.  
  16. Harald Fuchs wrote:
  17. > It's simply too easy to forget an appropriate catch clause.
  18.  
  19. But, that's my point exactly!  If it's easy to forget the catch clause,
  20. then it is even easier to forget to rectify the state of the shared
  21. data.  If you fail to unlock the mutex, your application will soon
  22. deadlock, which will make it obvious that something is wrong and which
  23. will suggest areas to examine; on the other hand, if the mutex is
  24. silently unlocked, then the problem my not surface until another thread
  25. at some distance away in the code attempts to use the shared data, and,
  26. at that point, all indications of the source of the problem are gone.
  27.  
  28. ------------------------------------------------------------------------
  29. Webb Scales                                Digital Equipment Corporation
  30. scales@wtfn.enet.dec.com                   110 Spit Brook Rd, ZKO2-3/Q18
  31. Voice: 603.881.2196, FAX: 603.881.0120     Nashua, NH 03062-2711
  32.          Rule #12:  Be joyful -- seek the joy of being alive.
  33. ------------------------------------------------------------------------
  34.